package com.vader.flea.util;

import java.util.Locale;

public class PathUtil {

    public static String separator = System.getProperty("file.separator");

    public static String getImgBasePath() {
        String os = System.getProperty("os.name");
        String basePath = "";
        if (os.toLowerCase().startsWith("win")) {
            basePath = "D:\\FleaMarket\\photo";
        } else {
            basePath = "\\home\\xiazai\\image";
        }
        basePath = basePath.replace("\\", separator);
        return basePath;
    }

    public static String getShopImagePath(long shopId){
            String imagePath = "\\upload\\item\\shop\\"+shopId+"\\";
             imagePath = imagePath.replace("\\",separator);
             return imagePath;
        }
}
